<div style="width:525px; height:550px; margin-left:30px; background-color:#fff;">
  <div id="pages" style="padding:15px 20px 20px; width:485px;">
    <h1><?php __('YOUR SHOPPING CART'); ?></h1>
<?php if (is_array($cart) && count($cart)>0) { ?>
    <div style="margin-top:10px;">
      <table width="100%" cellpadding="3" cellspacing="0" border="0">
<?php     $total = 0;
          foreach ($cart as $c) {
              $total += $c['total']; ?>
        <tr>
          <td rowspan="2"><img src="<?php e($this->base); ?>/img/products/<?php e($c['thumb']); ?>" width="146" height="140" /></td>
          <td colspan="3" valign="bottom"><?php e($c['name']); ?></td>
        </tr>
        <tr>
          <td valign="top">
            <form method="post" action="<?php e($this->base); ?>/pages/updateCart" onsubmit="return check(<?php e($c['qty']); ?>)">
              <input type="text" id="qty_<?php e($c['qty']); ?>" name="qty" value="<?php e($c['qty']); ?>" autocomplete="off" class="qty" style="width:40px;" />
              <input type="hidden" name="id" value="<?php e($c['id']); ?>" />
              <input type="submit" name="update" value="Update" style="font-size:10px;" />
            </form>
          </td>
          <td valign="top">$<?php e(number_format($c['total'], 2)); ?></td>
          <td valign="top">
            <form method="post" action="<?php e($this->base); ?>/pages/deleteCart">
              <input type="hidden" name="id" value="<?php e($c['id']); ?>" />
              <input type="submit" name="delete" value="Delete" style="font-size:10px;" />
            </form>
          </td>
        </tr>
<?php     } ?>
      </table>
    </div>
    <div style="border-top:2px solid #ccc; border-bottom:2px solid #ccc; padding:10px 0; margin:10px 0;">
      <table cellpadding="3" cellspacing="0" border="0" align="right">
        <tr>
          <td>Subtotal:</td>
          <td>$<?php e(number_format($total, 2)); ?></td>
        </tr>
      </table>
      <div class="clear"></div>
    </div>
    <table width="100%" cellpadding="3" cellspacing="0" border="0">
      <tr>
        <td align="center"><input type="button" name="continue" value="continue shopping" onclick="shopping()" /></td>
        <td align="center"><input type="button" name="checkout" value="CHECK OUT" onclick="checkout()" /></td>
      </tr>
    </table>
<?php } else { ?>
    <div style="text-align:center;">Your shopping cart is empty</div>
<?php } ?>
  </div>
</div>

<script type="text/javascript">
var _webroot = '<?php e($this->base); ?>';
function init () {
                  // bc tb <-  ->  del  0  1  2  3  4  5  6  7  8  9   0  1  2  3   4   5   6   7   8   9
    var validCode = [8, 9, 37, 39, 46, 48,49,50,51,52,53,54,55,56,57, 96,97,98,99,100,101,102,103,104,105];
    Ext.select('input.qty', false, 'pages').on('keydown', function(e, t){
        if (validCode.indexOf(e.keyCode) == -1) {
            e.stopEvent();
        }
    });
} // init

function check (id) {
    var qty = Ext.fly('qty_'+id).getValue();

    if (qty < 1) {
        alert('You have enter an invalid quantity!');
        Ext.fly('qty_'+id).dom.value = '';
        Ext.fly('qty_'+id).focus();
        return false;
    }

    return true;
} // check

function shopping () {
    document.location = _webroot+'/products/condom';
} // shopping

function checkout () {
    document.location = _webroot+'/members/shipping';
} // checkout
<?php $this->addScript('Ext.onReady(function() { init(); });'); ?>
</script>